package com.dunke.web.config;

import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * MyBatis相关配置
 */
//@Configuration
public class MyBatisConfig {

    /**
     * Mapper扫描配置. 自动扫描将Mapper接口生成代理注入到Spring.
     */
   /* @Bean
    public static MapperScannerConfigurer mapperScannerConfigurer() {
        MapperScannerConfigurer mapperScannerConfigurer = new MapperScannerConfigurer();
        *//**
         * 注意这里的扫描路径:
         *     1.不要扫描到自定义的Mapper;
         *     2.定义的路径不要扫描到tk.mybatis.mapper(如定义**.mapper).
         * 两个做法都会导致扫描到tk.mybatis的Mapper，就会产生重复定义的报错.
         *//*
        mapperScannerConfigurer.setBasePackage("com.dunke.core.dao");
        return mapperScannerConfigurer;
    }*/
}
